<template>
  <a-drawer
    title="审批详情"
    :visible="visible"
    :width="700"
    @close="onClose"
    :bodyStyle="{ padding: '0px' }"
  >
    <DetailShow :id="id" />
  </a-drawer>
</template>

<script>
import { defineComponent, reactive, toRefs } from "vue";
import DetailShow from "./DetailShow.vue";

export default defineComponent({
  name: "AddTask",
  props: {
    visible: {
      type: Boolean,
      default: false,
    },
    id: {
      type: Number,
      default: 0,
    },
  },
  components: { DetailShow },
  setup(props, { emit }) {
    const state = reactive({});

    const onClose = () => {
      emit("cancel");
    };
    return {
      ...toRefs(state),
      onClose,
    };
  },
});
</script>
